using System.ComponentModel.DataAnnotations;

namespace RAG.Application.Dtos;

/// <summary>
/// 创建用户DTO
/// </summary>
public class CreateUserDto
{
    [Required(ErrorMessage = "用户名不能为空")]
    [StringLength(50, ErrorMessage = "用户名长度不能超过50个字符")]
    public string UserName { get; set; } = string.Empty;

    [Required(ErrorMessage = "密码不能为空")]
    [StringLength(100, MinimumLength = 6, ErrorMessage = "密码长度必须在6-100个字符之间")]
    public string Password { get; set; } = string.Empty;

    [Required(ErrorMessage = "邮箱不能为空")]
    [EmailAddress(ErrorMessage = "邮箱格式不正确")]
    [StringLength(100, ErrorMessage = "邮箱长度不能超过100个字符")]
    public string Email { get; set; } = string.Empty;

    [Required(ErrorMessage = "手机号不能为空")]
    [StringLength(20, ErrorMessage = "手机号长度不能超过20个字符")]
    public string PhoneNumber { get; set; } = string.Empty;
} 